Ad Hoc Synchronization Considered Harmful

نویسندگان

  • Weiwei Xiong
  • Soyeon Park
  • Jiaqi Zhang
  • Yuanyuan Zhou
  • Zhiqiang Ma
چکیده

Many synchronizations in existing multi-threaded programs are implemented in an ad hoc way. The first part of this paper does a comprehensive characteristic study of ad hoc synchronizations in concurrent programs. By studying 229 ad hoc synchronizations in 12 programs of various types (server, desktop and scientific), including Apache, MySQL, Mozilla, etc., we find several interesting and perhaps alarming characteristics: (1) Every studied application uses ad hoc synchronizations. Specifically, there are 6–83 ad hoc synchronizations in each program. (2) Ad hoc synchronizations are error-prone. Significant percentages (22–67%) of these ad hoc synchronizations introduced bugs or severe performance issues. (3) Ad hoc synchronization implementations are diverse and many of them cannot be easily recognized as synchronizations, i.e. have poor readability and maintainability. The second part of our work builds a tool called SyncFinder to automatically identify and annotate ad hoc synchronizations in concurrent programs written in C/C++ to assist programmers in porting their code to better structured implementations, while also enabling other tools to recognize them as synchronizations. Our evaluation using 25 concurrent programs shows that, on average, SyncFinder can automatically identify 96% of ad hoc synchronizations with 6% false positives. We also build two use cases to leverage SyncFinder’s auto-annotation. The first one uses annotation to detect 5 deadlocks (including 2 new ones) and 16 potential issues missed by previous analysis tools in Apache, MySQL and Mozilla. The second use case reduces Valgrind data race checker’s false positive rates by 43–86%.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Interval-based Clock Synchronization for Ad-Hoc Sensor Networks

Clock synchronization is a crucial basic service in typical sensor networks, since the observations of distributed sensors more often than not need to be ordered (“a happened before b”) or otherwise related (“a and b happened within a time window of size x”) in time. Ad-hoc sensor networks exhibit characteristics which make the use of traditional clock-synchronization algorithms infeasible. Mor...

متن کامل

Toward secure and scalable time synchronization in ad hoc networks

Time synchronization is crucial in ad hoc networks. Due to the infrastructure-less and dynamic nature, time synchronization in such environments is vulnerable to various attacks. Moreover, time synchronization protocols such as IEEE 802.11 TSF (Timing Synchronization Function) often suffer from scalability problem. In this paper, we address the security and the scalability problems of time sync...

متن کامل

ARP considered harmful: manycast transactions in ad hoc networks

ARP handles neighbor discovery and address resolution in infrastructure networks, but is inadequate for Mobile Ad Hoc Networks (MANETs). Thus, many MANET routing protocols include a neighbor discovery mechanism. This separation of neighbor discovery and address resolution is a fundamental design problem that causes packet loss, particularly when the communication is manycast, a novel variant of...

متن کامل

Power-Saving Protocols for IEEE 802.11-Based Multi-Hop Ad Hoc Networks

Power-saving is a critical issue for almost all kinds of portable devices. In this paper, we consider the design of power-saving protocols for mobile ad hoc networks (MANETs) that allow mobile hosts to switch to a low-power sleep mode. The MANETs being considered in this paper are characterized by unpredictable mobility, multi-hop communication, and no clock synchronization mechanism. In partic...

متن کامل

Middleware for Synchronous Group Communication in Wireless Ad Hoc Networks

In this paper, we propose a Java-based middleware for group communication in wireless ad hoc networks. The proposed middleware provides facilities for establishing multiway synchronization channels among multiple agents (processes executed in mobile hosts) based on their locations. Through multi-way synchronization channels, agents can execute events on the same channel synchronously to exchang...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010